package ibm.websphere.monitor.tablib;


import ibm.websphere.monitor.common.SpringContext;
import ibm.websphere.monitor.page.WasPage;
import ibm.websphere.monitor.service.IUserService;
import ibm.websphere.monitor.util.UtilTool;

import java.util.List;


/**
 * @copyright www.timotai.net
 * @author 这家伙真懒
 * @date 2016-1-12
 * <pre></pre>
 **/
public class PageELFunction
{


	private static IUserService userService = SpringContext.getBean(IUserService.class);


	public static String formatPageURL(String pageURL, int pageNo) {
		pageURL = UtilTool.toGBK(pageURL);
		return pageURL.replace(WasPage.PAGENO_REPLACEMENT,
				String.valueOf(pageNo));
	}

	public static String renderPage(String type) {
		//获取分页模板
		return WasPage.IDEA_PAGE_TEMPLATE.replace("#{TYPE}", type);
	}


	/**
	 * <pre>
	 * 	页面中字符转码
	 * 	by zkf17983
	 * </pre>
	 * @param value
	 * @return
	 */
	public static String encodeUTF(String value){
		return UtilTool.toUTF(value);
	}


}
